package com.huluobo.a2206douyindemo.mine;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.base.bean.UserBeanResult;
import com.huluobo.base.bean.VideoBeanResult;
import com.huluobo.base.mvvm.BaseViewModel;

import java.util.List;

/**
 * Created by LC on 2024/8/21.
 */
public class MineViewModel extends BaseViewModel<MineRepo> {
    MutableLiveData<List<VideoBeanResult.VideoBean>> getCollectVideosSuccess = new MutableLiveData<>();
    MutableLiveData<String> getCollectVideosFailed = new MutableLiveData<>();

    MutableLiveData<UserBeanResult.UserBean> getUserInfoSuccess = new MutableLiveData<>();
    MutableLiveData<String> getUserInfoFailed = new MutableLiveData<>();

    public void queryUserInfoByName(String username) {
        repo.getUserInfo(username, getUserInfoSuccess, getUserInfoFailed);
    }

    public void queryCollectVideos() {
        repo.queryCollectVideos(getCollectVideosSuccess, getCollectVideosFailed);
    }

    @Override
    protected MineRepo createRepo() {
        return new MineRepo();
    }
}
